﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApp._Default" %>


<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">

    <style>
        th {
            text-align: center;
        }

        td {
            text-align: center;
            width: 120px;
        }

        #div1 {
            width: 500px;
            padding: 10px;
            position: relative;
        }

        #right {
            position: absolute;
            right: 0px;
            top:10px;
        }
    </style>

    <div id="div1">

        <asp:Button ID="addBtn" runat="server" Text="添加" OnClick="addBtn_Click" />

        <div id="right">
            <asp:TextBox ID="selTxb" runat="server" placeholder="输入筛选条件"></asp:TextBox>&nbsp;
            <asp:Button ID="selBtn" runat="server" Text="查询" OnClick="selBtn_Click" />&nbsp;
            <asp:Button ID="clearBtn" runat="server" Text="清除筛选" OnClick="clearBtn_Click" />
        </div>

       

    </div>

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" OnRowDeleting="GridView1_RowDeleting" AllowPaging="True" OnPageIndexChanging="GridView1_PageIndexChanging" DataKeyNames="id">
        <Columns>
            <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id">
                <ItemStyle Width="30px" />
            </asp:BoundField>
            <asp:BoundField DataField="TaskName" HeaderText="任务名称" SortExpression="TaskName" />
            <asp:BoundField DataField="TaskContent" HeaderText="任务内容" SortExpression="TaskContent" />
            <asp:BoundField DataField="Remarks" HeaderText="备注" SortExpression="Remarks" />
            <asp:ButtonField CommandName="Cancel" HeaderText="详情" ShowHeader="True" Text="详情" />
            <asp:CommandField HeaderText="操作" ShowDeleteButton="True" ShowHeader="True" DeleteText="&lt;span onclick=&quot;javaScript:return confirm('确定删除吗？')&quot;&gt;删除&lt;/span&gt;" />
        </Columns>
    </asp:GridView>


</asp:Content>
